#ifndef CONSTRAINEDOBJECT_H_
#define CONSTRAINEDOBJECT_H_

#include "Object.h"
//an object whose movement is constrained to a single axis
class ConstrainedObject : public Object
{
	protected:
	bool freeRotate;
	Vector2D movementAxis;
	Vector2D rightMovementEndpoint;
	Vector2D leftMovementEndpoint;
	
	public:
	
	ConstrainedObject(TextureManager * textureManager,
					Vector2D position,
					Vector2D * vertices,
					int numVertices,
					float mass,
					bool isGrabbable,
					bool freeRotate,
					Vector2D movementAxis,
					Vector2D movementEndpoints,
					char * textureName,
					Vector2D * textureVertices);
					
	virtual ~ConstrainedObject();
	virtual bool PreRotate(float theta);
	virtual void Think(double elapsedTime);
	virtual void AddForceObjectSpace(Vector2D ray, Vector2D origin);
	virtual void AddForceObjectSpace(Vector2D ray, Vector2D origin, bool groundForce);
};
#endif /*CONSTRAINEDOBJECT_H_*/
